<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <cpn>
            <template slot-scope="slot">
                <!-- <span v-for="item in slot.data">{{item}} -</span> -->
                <span>{{slot.data.join(' && ')}}</span>
            </template>
        </cpn>
    </div>

    <template id="cpn">
        <div>
            <slot :data="languages">
                <ul>
                    <li v-for="item in languages">{{item}}</li>
                </ul>
            </slot>
        </div>
    </template>
    <script src="../vue.js"></script>
    <script>
        const app = new Vue({
            el: '#app',
            components: {
                cpn: {
                    template: '#cpn',
                    data() {
                        return {
                            languages: ['java', 'python', 'javascript', 'go', 'c']
                        }
                    }
                }
            }
        })
    </script>
</body>
</html>